<template>
  <el-table :data="tableData"
            style="width:1000px;margin-left: 100px;margin-top: 30px;font-size: 16px;text-align: center">
    <el-table-column
      prop="date"
      label="放映时间"
      width="180">
    </el-table-column>
    <el-table-column
      prop="language"
      label="语言版本"
      width="180">
    </el-table-column>
    <el-table-column
      prop="showRoom"
      label="放映厅">
    </el-table-column>
    <el-table-column
      prop="money"
      label="售价(元)"
      width="180">
    </el-table-column>
    <el-table-column
      label="加入购物车">
      <template slot-scope="scope">
        <el-button @click="toCart(scope.row)" type="text" size="small" style="font-size:16px">加入购物车</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
    export default {
        name: "MovieInfor",
        data(){
            return{
                code:'3',
                tableData:[{
                    date:'12:30',
                    language:'中文',
                    showRoom:'3号激光厅',
                    money:'45',

                },
                    {
                        date:'11:00',
                        language:'中文',
                        showRoom:'4号激光厅',
                        money:'40',

                    },
                    {
                        date:'13:00',
                        language:'中文',
                        showRoom:'7号激光厅',
                        money:'30',

                    }
                ]
            }
        },
        methods:{

            toCart(row){
                console.log(row);
            },
            toSeat(row){
                console.log(row);
            },
            selectMovies(mid){
                var vm = this;
                this.axios({
                    url:'',
                }).then(function (res) {
                    if (res.data.success){
                        vm.tableData = res.data.data;
                    }
                })
            }
        },
        created() {
            var mid = this.$route.params.id;
            this.selectMovies(mid);
        }
    }
</script>

<style scoped>

</style>
